/*带有继承结构的标准Javabean类
在黑马程序员中有很多员工(Employee)。
按照工作内容不同分教研部员工(Teacher)和行政部员工(AdminStaff)
1.教研部根据教学的方式不同又分为讲师(Lecturer)和助教(Tutor)
2.行政部根据负责事项不同,又分为维护专员(Maintainer),采购专员(Buyer)
3.公司的每一个员工都编号,姓名和其负责的工作
4.每个员工都有工作的功能，但是具体的工作内容又不一样。
*/
public class A48{
	public static void main(String[] args){
		Employee lecturer = new Lecturer("E001", "张三", "Java课程教学");
        Employee tutor = new Tutor("E002", "李四", "Java课程辅导");
        Employee maintainer = new Maintainer("E003", "王五", "教学设备维护");
        Employee buyer = new Buyer("E004", "赵六", "办公用品采购");
		System.out.println(lecturer.getWorkname());
        lecturer.work();
		System.out.println(tutor.getWorkname());
        tutor.work();
		System.out.println(maintainer.getWorkname());
        maintainer.work();
		System.out.println(buyer.getWorkname());
        buyer.work();
	}
}
class Employee{
	private String workId;
	private String name;
	private String workname;
	public Employee(){}
	public Employee(String workId,String name,String workname){
		this.workId = workId;
		this.name = name;
		this.workname = workname;
	}
	public String getWorkId(){
		return workId;
	}
	public void setWorkId(String workId){
		this.workId = workId;
	}
	public String getName(){
		return name;
	}
	public void setName(String name){
		this.name = name;
	}
	public String getWorkname(){
		return workname;
	}
	public void setWorkname(String workname){
		this.workname = workname;
	}
	public void work(){
		System.out.println("员工在工作");
	}
}
class Teacher extends Employee{
	public Teacher(){}
	public Teacher(String workId,String name,String workname){
		super(workId,name,workname);
	}
	@Override
	public void work(){
		System.out.println("员工在负责教研教学");
	}
}
class AdminStaff extends Employee{
	public AdminStaff(){}
	public AdminStaff(String workId,String name,String workname){
		super(workId,name,workname);
	}
	@Override
	public void work(){
		System.out.println("员工在负责行政事项");
	}
}
class Lecturer extends Teacher{
	public Lecturer(){}
	public Lecturer(String workId,String name,String workname){
		super(workId,name,workname);
	}
	@Override
	public void work(){
		System.out.println("员工在讲课");
	}
}
class Tutor extends Teacher{
	public Tutor(){}
	public Tutor(String workId,String name,String workname){
		super(workId,name,workname);
	}
	@Override
	public void work(){
		System.out.println("员工在辅助讲课");
	}
}
class Maintainer extends AdminStaff{
	public Maintainer(){}
	public Maintainer(String workId,String name,String workname){
		super(workId,name,workname);
	}
	@Override
	public void work(){
		System.out.println("员工在维护行政事情");
	}
}
class Buyer extends AdminStaff{
	public Buyer(){}
	public Buyer(String workId,String name,String workname){
		super(workId,name,workname);
	}
	@Override
	public void work(){
		System.out.println("员工在采买东西");
	}
}
